package com.gym.controller;

import com.gym.client.EquipmentClient;
import com.gym.vo.EquipmentVo;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RequestMapping("/equipment-consumer")
@RestController
public class EquipmentController {

    @Resource
    private EquipmentClient equipmentClient;

    @CrossOrigin
    @RequestMapping("/sel_equipment")
    public List<EquipmentVo> sel_equipment(Integer pageIndex){
        System.err.println("EquipmentController sel_equipment ...");
        List<EquipmentVo> list = equipmentClient.sel_equipment(pageIndex);
        System.err.println(list);
        return list;
    }

}
